#ifndef TIMERMANAGER_H
#define TIMERMANAGER_H
#pragma once
#include <queue>
#include <deque>
#include "timercmp.h"

class TimerManager
{
public:
    TimerManager();

    ~TimerManager();

    void addTimer(std::shared_ptr<HttpData> request, int timeout);

    void handleExpiredEvent();

private:
    typedef std::shared_ptr<TimerNode> SharedTimerNode;

    std::priority_queue<SharedTimerNode, std::deque<SharedTimerNode>, TimerCmp> timerNodeQueue;

};

#endif // TIMERMANAGER_H
